#include "allocator_object.hpp"
#include <list>

using namespace std;
int main(int argc, char** argv)
{
    cout << "\033[1;33mlist copy test\n\033[0m";
    {
        list<int, MyAllocator<int>> mylist1;
        list<int, MyAllocator<int>> mylist2;
        cout << "mylist1 emplaces 2 elements\n";
        mylist1.emplace_back(42);
        mylist1.emplace_back(42);
        mylist2.emplace_back(42);
        mylist2.emplace_back(42);
        cout << "=============================\n";
        mylist2 = mylist1;
        cout << "=============================\n";
        mylist2.emplace_back(42);
        mylist2.emplace_back(42);
    }
    cout << "\033[1;33mlist move test\n\033[0m";
    {
        list<int, MyAllocator<int>> mylist1;
        list<int, MyAllocator<int>> mylist2;
        cout << "mylist1 emplaces 2 elements\n";
        mylist1.emplace_back(42);
        mylist1.emplace_back(42);
        cout << "mylist2 emplaces 2 elements\n";
        mylist2.emplace_back(42);
        mylist2.emplace_back(42);
        cout << "=============================\n";
        mylist2 = std::move(mylist1);
        cout << "=============================\n";
        mylist2.emplace_back(42);
        mylist2.emplace_back(42);
    }
    return 0;
}